package com.cloud.cop.impl;

import java.util.List;
import java.util.Locale;

import org.springframework.validation.ObjectError;
import org.springframework.web.context.request.WebRequest;

import com.cloud.cop.CopRequest;
import com.cloud.cop.CopResponse;
import com.cloud.cop.CopServiceContext;
import com.cloud.cop.CopServiceHandler;
import com.cloud.cop.ResponseFormat;
/**
 * <pre>
 * 		Cop 服务上下文的实现类
 * </pre>
 * 
 * @author mayh
 *
 */
public class DefaultSimpleCopServiceContext implements CopServiceContext {

	private String method;
	private Locale locale;
	private CopServiceHandler copServiceHandler;
	private String sessionId;
	private CopResponse copResponse;
	private CopRequest copRequest;
	private WebRequest webRequest;
	private ResponseFormat responseFormat;
	private String appKey;
	private List<ObjectError> allErrors;
	
	
	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}

	public void setResponseFormat(ResponseFormat responseFormat) {
		this.responseFormat = responseFormat;
	}

	public CopRequest getCopRequest() {
		
		return this.copRequest;
	}

	public CopResponse getCopResponse() {
		
		return this.copResponse;
	}

	public CopServiceHandler getCopServiceHandler() {
		
		return this.copServiceHandler;
	}

	public Locale getLocale() {
		
		return this.locale;
	}

	public String getMethod() {
		
		return this.method;
	}

	public String getSessionId() {
		
		return this.sessionId;
	}

	public WebRequest getWebRequest() {
		
		return this.webRequest;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public void setLocale(Locale locale) {
		this.locale = locale;
	}

	public void setCopServiceHandler(CopServiceHandler copServiceHandler) {
		this.copServiceHandler = copServiceHandler;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public void setCopResponse(CopResponse copResponse) {
		this.copResponse = copResponse;
	}

	public void setCopRequest(CopRequest copRequest) {
		this.copRequest = copRequest;
	}

	public void setWebRequest(WebRequest webRequest) {
		this.webRequest = webRequest;
	}

	public ResponseFormat getResponseFormat() {
		return this.responseFormat;
	}

	public String getAppKey() {
		return this.appKey;
	}

	public List<ObjectError> getAllErrors() {
		
		return this.allErrors;
	}

	public void setAllErrors(List<ObjectError> allErrors) {
		this.allErrors = allErrors;
	}
}
